<?php
if (! defined ( 'BASEPATH' )) {
	exit ( 'No direct script access allowed' );
}
/**
 * 创建团队 上传 照片 个人图标
 * Enter description here ...
 * @author 庆安
 *
 */

class yearbook extends CI_Controller {
	function __construct() {
		parent::__construct ();
		$this->load->helper ( 'url' );
		$this->load->model ( "yearbook_model" );
	}
	
	function index() {
		$this->load->view ( 'headers/header02' );
		$this->load->view ( "sczp/sczp" );
		$this->load->view ( "footers/footer02" );
	}
	function getYearBookInfo($yearbookRelegation = 1, $yearbookType = 0, $limit = 2, $offset = 1) {
		$this->load->library ( 'code_fragment' );
		$rs = $this->yearbook_model->queryPersonalYearbook ( array ('yearbookRelegation' => $yearbookRelegation, 'yearbookType' => $yearbookType ), $limit, $offset );
		
		$divCode="";
		foreach ( $rs as $result ) {
			
			$divCode.=$this->code_fragment->yearbookTag($result);
		}
		return  $divCode;
	}
	function getTeamYearbook($teamId='',$begin,$pageSize){
		$this->load->library ( 'code_fragment' );
		$divCode="";
		if(empty($teamId)){
			$teamId=$this->session->userdata("teamId");
		}
		$data=$this->yearbook_model->getTeamYearbook($teamId,$begin,$pageSize);
		if(!empty($data)){
			foreach ($data as $row)
			$divCode.=$this->code_fragment->yearbookTag($row);
			
		}
		echo $divCode;
		
		
	}
}
?>